<#include "/@inc/uiMacros.ftl">
<#include "/@inc/funcMacros.ftl">
<#include "/@inc/copyright.txt">
<#assign className = TriaGram + Prefix + LateType + "Cmd">
<#assign intfName = TriaGram + "I" + Prefix + LateType>
<#assign baseName = TriaGram + Prefix + LateType>
<@pp.renameOutputFile name=className+".h">
</@pp.renameOutputFile>
#ifndef ${className}_H
#define ${className}_H

<@CALC_STATES Attributes  />

<#assign numStates = states?size >

// MechanicalModelerUI framework
#include "CATPrtPanelStateCmd.h" // To derive from

class ${baseName}Dlg ;         // Dialog box to edit the user feature

<#switch numStates >
<#case 0>
<#break>
<#default>
class CATFeatureAgent ;
class CATDialogAgent ;
<#break>
</#switch>

class ${className}: public CATPrtPanelStateCmd
{
  CmdDeclareResource( ${className}, CATPrtPanelStateCmd )

  public:

    // Constructors
    //
    ${className}(CATISpecObject *ipSpec = NULL, int 	inCommandMode =1);

    virtual ~${className}();

    // BuildGraph
    // ----------
    // Constructs the agents, the states and the transitions.
    // In creation mode, the user feature instance is created in this
    // method, and not in the constructor to have the undo model in case
    // of Cancel exit
    //
    virtual void    	BuildGraph();

void CreateStateChart () ;

<#list states as st>
CATBoolean OnSelect${st.name}(void *) ;

CATBoolean OnSelect${st.name}List(void *) ;
</#list>

  private:
    // The edit dialog box to display the inputs (names and roles)
    ${baseName}Dlg      * _pDlg;

 // Agent to select a feature/list
<#list states as st>
CATFeatureAgent			* _pFeatureAgent${st.name}  ;
CATDialogAgent			* _pDialogAgent${st.name}  ;
</#list>

    // Copy constructor, not implemented
    // Set as private to prevent from compiler automatic creation as public.
    ${className}(const ${className} &iObjectToCopy);

    // Assignment operator, not implemented
    // Set as private to prevent from compiler automatic creation as public.
    ${className} & operator = (const ${className} &iObjectToCopy);
};

//----------------------------------------------------------------------

#endif

